package com.example.springbasic;

import com.example.springbasic.event.MsgEvent;
import com.example.springbasic.event.MsgListener;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
//@ComponentScan(basePackageClasses = {Animal.class, AnimalDTO.class})
//@ComponentScan(basePackages ={"com.example.springbasic"})
public class SpringbasicApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringbasicApplication.class, args);
//        ConfigurableApplicationContext context = SpringApplication.run(SpringbasicApplication.class, args);
//        //发布事件
//        context.publishEvent(new MsgEvent("测试事件."));

    }

}

